package com.sicheng.lc.lc笔试.美团篇;

/**
 * @author zsc
 * @version 1.0
 * @date 2022/4/24 16:22
 */
//链接：https://www.nowcoder.com/questionTerminal/0771ab500d424415af6b1aa4c13afcdd?answerType=1&f=discussion


import java.util.Scanner;

public class 正则序列 {
    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int[] num = new int[n];
        for (int i = 0; i < n; i++) {
            num[i] = input.nextInt();
        }
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            sum += i;
        }
        int cursum = 0;
        for (int i = 0; i < n; i++) {
            cursum += num[i];
        }
        System.out.println(sum - cursum);
    }
}
